package src 
{
	import flash.media.Sound;
	import flash.media.SoundChannel;
	import flash.media.SoundTransform;
	import flash.net.URLRequest;
	/**
	 * ...
	 * @author Felipe Soares Pinhel
	 */
	public class MediaPlayer 
	{
		public static var sound :Sound;
		public static var soundChannel:SoundChannel;
		public static var soundTransform : SoundTransform;
		
		public static var _instance : MediaPlayer;
		
		public function MediaPlayer() 
		{
			_instance = this;
			
			init();
		}
		
		private function init() : void
		{
			//sound = new Sound();
			//sound.load(new URLRequest("assets/ground_theme.mp3"));
			//sound.play();
			
			//soundChannel = new SoundChannel();
			//soundChannel = sound.play();
			
		}
		
		public static function menu() : void
		{
			sound = new Sound();
			sound.load(new URLRequest("assets/ground_theme.mp3"));
			//sound.play();
			soundChannel = new SoundChannel();
			soundChannel = sound.play();
			
			soundTransform = new SoundTransform();
			soundTransform.volume = 0.5;
			//
			soundChannel.soundTransform = soundTransform;
			
		}
		
		public static function level() : void
		{
			
			sound = new Sound();
			sound.load(new URLRequest("assets/ground_theme.mp3"));
			//sound.play();
			soundChannel = new SoundChannel();
			soundChannel = sound.play();
			
		}
		
	}

}